home *** CD-ROM | disk | FTP | other *** search
- %OP%VS4.13 (28-Apr-92), Gerald L Fitton, R4000 5966 9904 9938
- %OP%DP0
- %OP%IRY
- %OP%PL0
- %OP%HM0
- %OP%FM0
- %OP%BM0
- %OP%LM4
- %OP%PT1
- %OP%PDPipeLine
- %OP%WC834,2070,184,1620,0,0,0,0
- %CO:A,72,72%
- %C%PipeDream as a 'Multifile' DataBase
- %C%By Gerald L Fitton
- Keywords:
- Beginners Database Multifile Fitton
-
- In this article I hope to introduce you to the use of PipeDream as a
- 'Multifile' database. Some of you familiar with say DBase (on a PC)
- may cringe a little at some of the nonstandard terms which I am going
- to use, but remember that this is intended for PipeDream users so I
- want to use terms that will be understood. My example uses two
- dependent documents plus a letter.
-
- Databases contain similar information about many similar things. For
- example you could have a database containing information about your
- compact discs or another with information about your friends' names,
- addresses and telephone numbers. As we have seen in DataBase1, a
- simple database consists of a single file. That one file contains all
- the information you have and need about those things; this means one
- file for 'Compact Discs' and another file for 'Friends'.
-
- A file consists of Records, one row per record. Taking the example of
- your friends, you would have one record for each friend. Using
- PipeDream (and not using the multi-row record facility) all the
- information you want to store about a single person would be found in
- one row - so all the information about Fred Bloggs might be found in
- row 13 (lucky for some). Each record consists of many Fields. Each
- field is a particular piece of information, for example 'Bloggs' would
- be in the field called 'Surname' (or family name) and you would use a
- different field for telephone number. Using PipeDream, one column is
- used for each field. You could put everybody's surname in the first
- field, column A, and everybody's telephone number in the tenth field,
- column J. It is important that you do not mix the fields up. For
- example, if one address is shorter than another (perhaps because you
- don't know Fred's post code to enter into the 9th field - column I)
- then that missing field (slot I13) must be left blank. Do not move the
- telephone number into the 9th field. Such a file can be sorted on any
- field (eg to group together everybody with an 01-200 telephone number)
- and then you can do operations on a marked block (eg search and replace
- the 01 with 071 - have I got it right or should I have replaced with
- 081?) finally putting the file back in alphabetical order of surname.
- You can use mail merge techniques to print out labels or customised
- mail shots. (Dear Fred - Out of all the people in Any Street,
- Yourtown, you Mr Bloggs have been specially selected for our super
- duper prize draw . . . . now just buy one of our new fangled whatsits).
-
- One use for a database might be for a club which loans out specialist
- DIY tools to its members. This is the example I have chosen (but don't
- load it yet). You could have the tool in the first field (column A)
- and the club member's membership number in another field followed by
- date of loan, hire charges, etc, in other fields. You may want to send
- a reminder to a member that a tool has not been returned. More usually
- you may want to send a similar 'customised' letter to all members who
- have been tardy at returning their borrowed tools. In your innocence
- you may think you must either store the full name and address of the
- member in the [Tools] file (for every tool they borrow!) or look up the
- member's name and address against their membership number (manually) in
- a second [Members] file. Well, not if you have a 'Multifile' database.
-
- With a 'Multifile' database you can pick up 'cross referenced' data
- automatically from one file to another. In the example above (the
- reminder to return a tool) you want your form letter exercise to pick
- up that the tool should have been returned but hasn't (that's the easy
- bit - search or sort the [Tool] file) and then, using the name of the
- hirer from the [Tools] file, look up the hirer's address in the
- [Members] file (ie get the 'cross reference') and print the address in
- the form letter in the slots reserved for it.
-
- Using the 'Dependent Documents' facility of PipeDream you can, with
- some thought and care, use it as a 'Multifile' database. Double click
- on the file in this directory called [Letter]; it and two other files,
- [Members] and [Tools], will also be loaded. Set up your screen so that
- at the top left is the file called [Tools], at the top right one called
- [Members] and the bottom widow contains the file [Letter].
-
- This simple [Tools] file consists of three columns containing: column
- A, the tool borrowed, column B, the tool club member's membership
- number, and column C, the date when the tool is due for return. The
- date 10 June 90 is entered by using 'Edit Function' and typing in
- 10.6.90 and pressing <Return>. There are no cross references in the
- [Tools] file. The [Members] file as shown here also contains three
- columns: column A, the member's membership number, column B, their
- Surname, and column C, their Forenames. Of course you could extend
- this to include their address and the date on which their subscription
- is due, etc. Again, there are no cross references but, when you lend a
- tool out, you must be sure that you enter the member's number in the
- [Tools] file. Although [Tools] and [Members] have the members in the
- same order, this is just coincidence; you can sort the files
- independently into any order (date, tool, surname, etc) by any field
- and the relational database will still 'work'.
-
- It is in the 'Letter' file that all the cross references occur. The
- entry in [Letter]B2 has to be typed in by the letter writer. It can
- contain the tool name, Drill06 or, in my view better, [Tools]A5. Slots
- [Letter]A2 to [Letter]A6 are typed in in the usual way but [Letter]B2
- to [Letter]B6 contain the cross references. One of the more complex
- ones, [Letter]B5, has a double cross reference. Place the cursor in
- slot [Letter]B5 and you will see the double 'lookup' formula. The
- effect of all this is that column [Tools]A is searched for the tool
- shown in [Letter]B2. When it is found, the member's number (in the
- same row as the tool but in the column [Tools]B) and the due date (from
- the column [Tools]C) are entered into [Letter]B4 and [Letter]B3
- respectively. [Letter]B5 and [Letter]B6 carry out a similar lookup for
- the member's number, but, having found it, that number is matched in
- the [Members]A column and the values of the Surname and Forenames from
- the [Members]B and [Members]C columns are transferred to the [Letter]B5
- and [Letter]B6 slots. Once you have written the letter, the next
- letter can be generated automatically by changing the content of slot
- [Letter]B2 from [Tools]A5 to [Tools]A6. All the cross references such
- as members's number, name, etc will automatically appear in the slots
- [Letter]B3 to [Letter]B6. Of course, if you have an address for the
- member in other columns of the [Members] file then these can be
- automatically transferred in the same way.
-
- The letter itself can contain references to the slots [Letter]B2 to
- [Letter]B6. As an example, the letter proper, which starts in
- [Letter]A8 contains: "Dear @@B6@@ @@B5@@" so that "Fred Bloggs" gets
- transferred automatically from the slots B6 and B5 into the space after
- the word "Dear". The slot A10 contains: "Our records show that the
- tool @@B2@@@@@ should have been returned by @@B3@@@@@ . . . .". The effect
- of the @@ signs immediately before and after the B6 and B5 is to
- transfer the data from B2 and B3 into the body of the letter. You
- should put in a few extra @ signs so that you can guarantee that the
- line will format correctly. You can use 'Format paragraph' in the
- usual way on the bodytext of the letter.
-
- A nice touch (not shown here for clarity) is to keep the slots
- [Letter]B2 to [Letter]B6 off screen, say in slots D2 to D6, and reduce
- the width of column D to zero before printing. There are other ways of
- achieving the same effect such as printing a marked block or a range of
- columns. But perhaps you want the references printed?
-
- You may have noticed that the [Tools] and [Members] files have each two
- blank rows (rows 4 and 9) which are included in the database lookup
- formulae. This is so that you can mark rows 5 to 8 of the [Tools] and
- [Members] files and sort them without the lookup references in the
- letter file being updated.
-